package lab02.Test28;

import java.util.InputMismatchException;
import java.util.Scanner;

/**
 * Created by tanfei on 2017/11/9.
 */
public class Test {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        try{
            System.out.println("请输入圆的半径：");
            double radius = scanner.nextDouble();
            double area = Math.PI*radius*radius;
            System.out.println(area);
        }catch (InputMismatchException e){
            System.out.println("圆的半径不能是非double型字符串!");
        }
        finally {


        }
    }
}



